/**
 * 判断是否能一笔画，要满足2个条件
 * 1. 连通
 * 2. 奇数度数的点数量为0或者2
 */
#include <bits/stdc++.h>
using namespace std;

using vi = vector<int>;

struct uf_t{

vi father;
void init(int n){father.assign(n+1,0);for(int i=1;i<=n;++i)father[i]=i;}
int find(int x){return father[x] == x ? x : father[x] = find(father[x]);}
void unite(int x, int y){father[find(y)] = find(x);}

}UF;

int N, M;
vi D;

bool proc(){
    int c = 0;
    for(int i=1;i<=N;++i){
        if(1 & D[i])if(++c > 2)return false;
        if(UF.find(i) != UF.find(1))return false;
    }
    return c != 1;
}

int main(){
#ifndef ONLINE_JUDGE
    freopen("z.txt", "r", stdin);
#endif
    ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(0);
    int nofkase; cin >> nofkase;
    for(int kase=1;kase<=nofkase;++kase){
        cin >> N >> M;
        UF.init(N); 
        D.assign(N + 1, 0);
        for(int a,b,i=0;i<M;++i){
            cin >> a >> b;
            UF.unite(a, b);
            ++D[a]; ++D[b];
        }
        cout << (proc() ? " Zhen" : " Xun") << endl;
    }
    return 0;
}